import request from "@/utils/request";
//新增接口
export const addMat = (data) => {
  return request({ url: "base/matMaterial/add", method: "post", data });
};
//编辑接口
export const updateMat = (data) => {
  return request({
    url: "base/matMaterial/edit",
    method: "post",
    data,
  });
};
//查询接口
export const listMat = (params) => {
  return request({
    url: "base/matMaterial/list",
    method: "get",
    params,
  });
};
export const getMatList = (params) => {
  return request({
    url: "base/matMaterial/listMat",
    method: "get",
    params,
  });
};
//删除接口
export const delMat = (params) => {
  return request({
    url: "base/matMaterial/deleteBatch",
    method: "post",
    params,
  });
};
//数据回显接口
export const getMat = (param, data) => {
  return request({
    url: `base/matMaterial/queryById?id=${param}`,
    method: "get",
    data,
  });
};

// 获取产品列表
export function syncErpMaterial(params) {
  return request({
    url: "base/matMaterial/syncErpMaterial",
    method: "get",
    params,
  });
}
